// import Login from '@/views/Login'
// import Home from '@/views/Home'
// import Register from '@/views/Register'
// import List from '@/views/Layout/List'
// import News from '@/views/Layout/News'
// import Profile from '@/views/Layout/Profile'
import Layout from '@/views/Layout'
// import City from '@/views/City'
// import Map from '@/views/Map'
// import Detail from '@/views/Detail'
// import Rent from '@/views/Rent'
// import Add from '@/views/Rent/Add'
// import Search from '@/views/Rent/Search'
// import Favorite from '@/views/Favorite'
// import Chat from '@/views/Chat'

export default [
  {
    path: '/',
    redirect: '/home'
  },
  {
    name: 'login',
    path: '/login',
    component: () => import('@/views/Login')
  },
  {
    name: 'register',
    path: '/register',
    component: () => import('@/views/Register')

  },
  {
    name: 'layout',
    path: '/layout',
    component: Layout,
    children: [
      {
        name: 'home',
        path: '/home',
        component: () => import('@/views/Home'),
        meta: { title: 'home' }
      },

      {
        name: 'news',
        path: 'news',
        component: () => import('@/views/Layout/News'),
        meta: { title: 'news' }
        // meta: 路由原信息
      },
      {
        name: 'list',
        path: 'list',
        component: () => import('@/views/Layout/List'),
        meta: { title: 'list', isRecord: true, top: 0 } // isRecord是否需要设置滚动位置
      },
      {
        name: 'profile',
        path: 'profile',
        component: () => import('@/views/Layout/Profile'),
        meta: { title: 'profile' }
      }
    ]
  },
  {
    name: 'city',
    path: '/city',
    component: () => import('@/views/City')
  },
  {
    name: 'map',
    path: '/map',
    component: () => import('@/views/Map')
  },
  {
    name: 'detail',
    path: '/detail/:value',
    component: () => import('@/views/Detail')
  },
  {
    name: 'rent',
    path: '/rent',
    component: () => import('@/views/Rent')
  },
  {
    name: 'add',
    path: '/rent/add',
    component: () => import('@/views/Rent/Add')
  },
  {
    name: 'search',
    path: '/rent/search',
    component: () => import('@/views/Rent/Search')

  },
  {
    name: 'favorite',
    path: '/favorite',
    component: () => import('@/views/Favorite')
  },
  {
    name: 'chat',
    path: '/chat',
    component: () => import('@/views/Chat')
  },
  {
    path: '*',
    red: '/home'
  }

]
